package com.nuoniu.sibanyun.service.expenses;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nuoniu.sibanyun.entity.expenses.ExpensesPaymentOrder;
import com.nuoniu.sibanyun.entity.expenses.dto.ExpensesPaymentOrderSearchDto;

import java.math.BigDecimal;

/**
 * <p>
 * 费用中心-支付订单 服务类
 * </p>
 *
 * @author 小啊刚
 * @since 2022-05-06
 */
public interface IExpensesPaymentOrderService extends IService<ExpensesPaymentOrder> {
    /**
     * 分页查询 支付订单（系统）
     * @param paymentOrderSearchDto
     * @return
     */
    Page<ExpensesPaymentOrder> pageList(ExpensesPaymentOrderSearchDto paymentOrderSearchDto);

    /**
     * 创建 充值订单
     * @param amount
     */
    ExpensesPaymentOrder createPayOrder(BigDecimal amount);

    /**
     * 获取流水
     * @return
     */
    Integer getSerialNum();

    /**
     * 成功支付订单
     * @param expensesPaymentOrder
     */
    void successPayment(ExpensesPaymentOrder expensesPaymentOrder);

    /**
     * 通过订单号查询
     * @param orderNo
     * @return
     */
    ExpensesPaymentOrder getByOrderNo(String orderNo);

}
